import {Component, Prop, Vue} from 'vue-property-decorator'
import btnResetPrint from './btn_reset_print.tsx'
import {store} from '@/store/index'


@Component({})
export default class btnPrint extends btnResetPrint{
    name:string = 'btn-Print'

    get disabled (){
        return this.singleStatus !== '分配集印'
    }
    
    clickFn (){
        const _vue:any = this;

        // 当前操作项目
        this.commitCurrentSingle(this.mod.key);

        store.dispatch('request', {
            url:'post/india/id',
            data: {}
        }).then(success =>{

            if(success){
                _vue.$Notice.success({
                    title: '集印成功'
                })

                store.dispatch('request', {
                    url: 'patch/single/id',
                    data: {}
                })
            }


        })

    }
    

}